package IMIC.NGUYENVANDOAN.SWINGDEMO;

import java.util.ArrayList;
import java.util.List;

public class DataRepository {
    private static List<UserEntity> lisUsers = null;

    public static List<UserEntity> GetElements() {
        if (lisUsers == null) {
            lisUsers = new ArrayList<UserEntity>();
            UserEntity obj01 = new UserEntity();
            obj01.setUserId(1);
            obj01.setFullName("Nguyễn Văn A");
            obj01.setUserName("anv");
            obj01.setPassWord("123");

            UserEntity obj02 = new UserEntity();
            obj02.setUserId(2);
            obj02.setFullName("Trần Thị B");
            obj02.setUserName("btt");
            obj02.setPassWord("123");

            UserEntity obj03 = new UserEntity();
            obj03.setUserId(3);
            obj03.setFullName("Hoàng Văn C");
            obj03.setUserName("chv");
            obj03.setPassWord("123");

            lisUsers.add(obj01);
            lisUsers.add(obj02);
            lisUsers.add(obj03);
        }
        return lisUsers;
    }
}
